<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./Promise.js?a=1"></script>
    <script>
        // 1- 状态只允许更改一次。
        const p1 = new Promise((resolve,reject)=>{
            resolve(100);// 成功fulfilled,值为100
            reject(200);// 失败rejected,值为200
            throw "异常";// 失败rejected,值为异常
        });
        console.log(p1);
    </script>
</body>
</html>